<?php
class Report_Form_Inventory extends ZendX_JQuery_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{	
		//inventory_product_code
		$inventory_product_code=$this->createElement ( 'select', 'inventory_product_code' )
		->setLabel("Hàng hóa")
		;
		
		//product_group_code
		$product_group_code=$this->createElement ( 'select', 'product_group_code' )
		->setLabel("Nhóm hàng hóa")
		;
		
		//inventory_lot_code
		$inventory_lot_code=$this->createElement ( 'text', 'inventory_lot_code' )
		->setLabel("Mã lot")
		->setDescription ( 
		"<br/><br/>"
		.$controller->view->partial("index/manage/submit.phtml",'admin',array('value'=>'Tìm kiếm thông tin','onclick'=>"$('#adminForm').submit();")))
		;
		
		//inventory_lot_code
		$inventory_lot_code=$this->createElement ( 'text', 'inventory_lot_code' )
		->setLabel("Mã lot")
		->setDescription ( 
		"<br/><br/>"
		.$controller->view->partial("index/manage/submit.phtml",'admin',array('value'=>'Tìm kiếm thông tin','onclick'=>"$('#adminForm').submit();")))
		;
		
		//unit_code
		$unit_code=$this->createElement ( 'select', 'unit_code' )
		->setLabel ( "Đơn vị qui đổi của BC")
		->setDescription($controller->getHelper('common')->getDescription($unit_code) )
		;
		
		$this->addElements ( array (
			$product_group_code,
			$inventory_product_code,
			$inventory_lot_code,
			$unit_code,
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}